package cn.iocoder.yudao.module.water.dal.mysql.day1;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.water.dal.dataobject.day1.ReportDay1DO;
import cn.iocoder.yudao.module.water.dal.dataobject.month.ReportMonthDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.water.controller.admin.day1.vo.*;
import org.apache.ibatis.annotations.Param;

/**
 * 日报表1 Mapper
 *
 * @author 左达成
 */
@Mapper
public interface ReportDay1Mapper extends BaseMapperX<ReportDay1DO> {

    default PageResult<ReportDay1DO> selectPage(ReportDay1PageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ReportDay1DO>()
                .betweenIfPresent(ReportDay1DO::getRtime, reqVO.getRtime())
                .orderByDesc(ReportDay1DO::getId));
    }

    default List<ReportDay1DO> selectList(ReportDay1ExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<ReportDay1DO>()
                .betweenIfPresent(ReportDay1DO::getRtime, reqVO.getRtime())
                .orderByDesc(ReportDay1DO::getId));
    }

//    default List<ReportDay1DO> selectOneDay1List(String st, String end) {
//        return selectList(new LambdaQueryWrapperX<ReportDay1DO>()
//                .between(ReportDay1DO::getRtime, st, end));
//    }

    List<ReportDay1DO> selectOneDay1List(@Param("db1") String db1, @Param("db2") String db2, @Param("start") String start, @Param("end") String end);

}
